<?php

use app\models\Options;
use yii\bootstrap5\Html;
use yii\bootstrap5\ActiveForm;

/** @var yii\web\View $this */
/** @var app\models\IssueSearch $model */
/** @var yii\bootstrap5\ActiveForm $form */
?>

<div class="issue-search">

    <?php $form = ActiveForm::begin([
        // 'action' => ['index'],
        'method' => 'get',
        'layout' => ActiveForm::LAYOUT_INLINE,
        'fieldClass' => \app\widgets\ActiveField::class, // bootstrap5 就是碉堡了
        'options' => [
            'class' => 'd-flex',
        ]
        
    ]); ?>

    <?= $form->field($model, 'contactName') ?>

    <?= $form->field($model, 'priority')->dropDownList(Options::issuePriorities(true))->label(false) ?>

    <?= $form->field($model, 'state')->dropDownList(Options::issueStates(true))->label(false) ?>

    <?php // echo $form->field($model, 'date') ?>

    <?php // echo $form->field($model, 'createdAt') ?>

    <?php // echo $form->field($model, 'updatedAt') ?>

    <div class="form-group ms-3">
        <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
